﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZCrawler;

namespace ZCrawler.Unit.Test
{
    public class PPCrawlTask
    {
        public void Process()
        {
            //ZTask task = new ZTask()
            //{
            //    Url = "http://www.pacificplace.com.hk/en/mall/shopping/shop-name/"
            //};

            //ZRuleNav navRule = new ZRuleNav("nav")
            //{
            //    navMark = "/sc/mall/shopping/shops/"
            //};
            //ZAnalysis n_analyst = new ZAnalysis(navRule);
            //task.navAnalyst = n_analyst;

            //ZRuleXPath rule_title = new ZRuleXPath(ZXPathType.InnerText, "store_title");
            //rule_title.AddXPath("//*[@id=\"Radeditorplaceholdercontrol1\"]");

            //ZRuleXPath rule_floor = new ZRuleXPath(ZXPathType.InnerText, "store_floor");
            //rule_floor.AddXPath("//*[@id=\"DropDownListAndTextBoxPlaceholderControl1\"]/ul/li/a");

            //ZRuleXPath rule_categories = new ZRuleXPath(ZXPathType.InnerText, "store_categories");
            //rule_categories.AddXPath("//*[@id=\"MultipleDropDownListPlaceholderControl1\"]/span");

            //ZRuleXPath rule_tel = new ZRuleXPath(ZXPathType.InnerText, "store_tel");
            //rule_tel.AddXPath("//*[@id=\"Radeditorplaceholdercontrol4\"]");
            //List<ZBasicRule> rules = new List<ZBasicRule>();
            //rules.Add(rule_title);
            //rules.Add(rule_floor);
            //rules.Add(rule_categories);
            //rules.Add(rule_tel);
            //ZAnalysis analysis = new ZAnalysis(rules);
            //task.analysis = analysis;
            //task.Launch();
        }
    }
}
